package com.xydtech.ecard.merchant.service.impl;

import com.xydtech.common.core.text.Convert;
import com.xydtech.ecard.merchant.domain.EcardMerchantHandover;
import com.xydtech.ecard.merchant.mapper.EcardMerchantHandoverMapper;
import com.xydtech.ecard.merchant.service.IEcardMerchantHandoverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商户移交记录Service业务层处理
 * 
 * @author xydtech
 * @date 2023-07-31
 */
@Service
public class EcardMerchantHandoverServiceImpl implements IEcardMerchantHandoverService
{
    @Autowired
    private EcardMerchantHandoverMapper ecardMerchantHandoverMapper;

    /**
     * 查询商户移交记录
     * 
     * @param id 商户移交记录主键
     * @return 商户移交记录
     */
    @Override
    public EcardMerchantHandover selectEcardMerchantHandoverById(Long id)
    {
        return ecardMerchantHandoverMapper.selectEcardMerchantHandoverById(id);
    }

    /**
     * 查询商户移交记录列表
     * 
     * @param ecardMerchantHandover 商户移交记录
     * @return 商户移交记录
     */
    @Override
    public List<EcardMerchantHandover> selectEcardMerchantHandoverList(EcardMerchantHandover ecardMerchantHandover)
    {
        return ecardMerchantHandoverMapper.selectEcardMerchantHandoverList(ecardMerchantHandover);
    }

    /**
     * 新增商户移交记录
     * 
     * @param ecardMerchantHandover 商户移交记录
     * @return 结果
     */
    @Override
    public int insertEcardMerchantHandover(EcardMerchantHandover ecardMerchantHandover)
    {
        return ecardMerchantHandoverMapper.insertEcardMerchantHandover(ecardMerchantHandover);
    }

    /**
     * 修改商户移交记录
     * 
     * @param ecardMerchantHandover 商户移交记录
     * @return 结果
     */
    @Override
    public int updateEcardMerchantHandover(EcardMerchantHandover ecardMerchantHandover)
    {
        return ecardMerchantHandoverMapper.updateEcardMerchantHandover(ecardMerchantHandover);
    }

    /**
     * 批量删除商户移交记录
     * 
     * @param ids 需要删除的商户移交记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardMerchantHandoverByIds(String ids)
    {
        return ecardMerchantHandoverMapper.deleteEcardMerchantHandoverByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商户移交记录信息
     * 
     * @param id 商户移交记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardMerchantHandoverById(Long id)
    {
        return ecardMerchantHandoverMapper.deleteEcardMerchantHandoverById(id);
    }
}
